<?php

namespace App\Service\System;
use DB;
use Qiniu\Auth;
class SystemService
{
    public static function addContactLog(array $data)
    {
        $result = DB::table('lsj_contact_us')->insert($data);
        return $result;
    }

    public static function getUploadToken()
    {
        $qiniu = config('qiniu.qiniu');
        $accessKey = $qiniu['app_key'];
        $secretKey = $qiniu['app_secret'];
        $auth = new Auth($accessKey,$secretKey);
        $bucket = $qiniu['bucket'];
        $token = $auth->uploadToken($bucket);
        return $token;
    }
}